//
//  MyVM.m
//  WanCaiC8
//
//  Created by tangang on 2018/4/20.
//  Copyright © 2018年 tangang. All rights reserved.
//

#import "MyVM.h"

@implementation MyVM

- (void)getUserInfoWithUserId:(NSString *)userId WithSuccess:(SuccessBlock)success andFail:(FailBlock)fail{
    [self GET_Field_Url:@"api/Personal/PersonalIndexData" Params:@{@"uid":userId} successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            UserInfoModel *model=[UserInfoModel mj_objectWithKeyValues:[returnValue objectForKey:@"Data"]];
            if ([model.Id isEqualToString:[UserModel userModel].UserId]) {
                [[UserInfoModel share] setData:model];
            }
            
            success(model);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (void)updatePasswordWithOldPwd:(NSString *)oldpwd andNewPwd:(NSString *)newpwd andSuccess:(SuccessBlock)success andFail:(FailBlock)fail{
    [self POST_Field_Url:@"api/Auth/SetPassword" Params:@{@"OldPassword":oldpwd,@"Password":newpwd} successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            [UserModel clean];
            success(returnValue);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (void)updateUserInfoWithValue:(NSString *)value andType:(NSInteger)type andSuccess:(SuccessBlock)success andFail:(FailBlock)fail{
    [self POST_Field_Url:[NSString stringWithFormat:@"api/Personal/EditUserInfo"] Params:@{@"value":value,@"type":[NSNumber numberWithInteger:type]} successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            success(returnValue);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (void)getMyFollowWithLastId:(NSString *)lastId Success:(SuccessBlock)success andFail:(FailBlock)fail{
    [self GET_Field_Url:@"api/Personal/GetMyFollow" Params:@{@"lastId":lastId,@"pageSize":defaultPageSize} successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            success([FouseModel mj_objectArrayWithKeyValuesArray:[returnValue objectForKey:@"Data"]]);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (void)cancleFollowWithId:(NSString *)followedUserId Success:(SuccessBlock)success andFail:(FailBlock)fail{
    [self GET_Field_Url:@"api/Personal/UnFollow" Params:@{@"followedUserId":followedUserId} successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            success(returnValue);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (void)addFollowWithId:(NSString *)followedUserId Success:(SuccessBlock)success andFail:(FailBlock)fail{
    [self GET_Field_Url:@"api/Personal/IFollow" Params:@{@"followedUserId":followedUserId} successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            success(returnValue);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (void)getMyFansWithLastId:(NSString *)lastId Success:(SuccessBlock)success andFail:(FailBlock)fail{
    [self GET_Field_Url:@"api/Personal/GetMyFans" Params:@{@"lastId":lastId,@"pageSize":defaultPageSize} successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            success([FouseModel mj_objectArrayWithKeyValuesArray:[returnValue objectForKey:@"Data"]]);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (void)getTaskListSuccess:(SuccessBlock)success andFail:(FailBlock)fail{
    [self GET_Field_Url:@"api/Personal/GetTaskList" Params:nil successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            success([TaskModel mj_objectArrayWithKeyValuesArray:[returnValue objectForKey:@"Data"]]);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (void)getMyCommissionSuccess:(SuccessBlock)success andFail:(FailBlock)fail{
    [self GET_Field_Url:@"api/Personal/GetMyCommission" Params:nil successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            success([MyCommissionModel mj_objectWithKeyValues:[returnValue objectForKey:@"Data"]]);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}



- (void)getRecordListWithType:(NSInteger)type andPage:(NSInteger)page andSuccess:(SuccessBlock)success andFail:(FailBlock)fail{
    [self GET_Field_Url:@"api/Personal/GetRecordList" Params:@{@"Type":@(type),@"pageIndex":@(page),@"pageSize":defaultPageSize} successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            success([PrepaidRecords mj_objectArrayWithKeyValuesArray:[[returnValue objectForKey:@"Data"]objectForKey:@"PageData"]]);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (void)getMyCommissionWithType:(NSInteger)type andPage:(NSInteger)page andSuccess:(SuccessBlock)success andFail:(FailBlock)fail{
    [self GET_Field_Url:@"api/Personal/GetMyCommissionList" Params:@{@"Type":@(type),@"pageIndex":@(page),@"pageSize":defaultPageSize} successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            success([PrepaidRecords mj_objectArrayWithKeyValuesArray:[[returnValue objectForKey:@"Data"]objectForKey:@"PageData"]]);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (void)getBankCardWithUserId:(NSString *)userId andSuccess:(SuccessBlock)success andFail:(FailBlock)fail{
    [self GET_Field_Url:@"api/Amount/GetUserBankCard" Params:@{@"userId":userId} successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            success([BankModel mj_objectWithKeyValues:[returnValue objectForKey:@"Data"]]);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (void)addBankCardWithDict:(NSDictionary *)dict andSuccess:(SuccessBlock)success andFail:(FailBlock)fail{
    [self POST_Field_Url:@"api/Amount/AddBankCard" Params:dict successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            success(returnValue);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (void)addWithdrawalRecordWithBankId:(NSString *)bankId andMoney:(NSString *)money andSuccess:(SuccessBlock)success andFail:(FailBlock)fail{
    [self GET_Field_Url:@"api/Amount/AddExtractCash" Params:@{@"bankId":bankId,@"money":money,@"userId":[UserInfoModel share].Id} successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            success(returnValue);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (void)getBetWithPId:(NSString *)pid andSuccess:(SuccessBlock)success andFail:(FailBlock)fail{
    [self GET_Field_Url:@"api/Personal/GetBet" Params:@{@"pid":pid,@"pageIndex":@1,@"pageSize":@200} successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            success([QuizLotteryModel mj_objectArrayWithKeyValuesArray:[[returnValue objectForKey:@"Data"]objectForKey:@"PageData"]]);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (void)getMyBetWithLtype:(NSInteger)ltype andPlayName:(NSString *)playName andPage:(NSInteger)pageIndex andSuccess:(SuccessBlock)success andFail:(FailBlock)fail{
    [self GET_Field_Url:@"api/Personal/GetMyBet" Params:@{@"ltype":@(ltype),@"PlayName":playName,@"pageIndex":@(pageIndex)} successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            success([GradesModel mj_objectArrayWithKeyValuesArray:[[returnValue objectForKey:@"Data"]objectForKey:@"PageData"]]);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (void)getDenamicWithUid:(NSString *)uid andPage:(NSInteger)pageIndex andSuccess:(SuccessBlock)success andFail:(FailBlock)fail{
    [self GET_Field_Url:@"api/Personal/GetDenamic" Params:@{@"uid":uid,@"pageIndex":@(pageIndex)} successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            success([DynamicModel mj_objectArrayWithKeyValuesArray:[[returnValue objectForKey:@"Data"]objectForKey:@"PageData"]]);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (void)getVisitRecordWithUid:(NSString *)uid andPage:(NSInteger)pageIndex andSuccess:(SuccessBlock)success andFail:(FailBlock)fail{
    [self GET_Field_Url:@"api/Personal/GetVisitRecord" Params:@{@"uid":uid,@"pageIndex":@(pageIndex)} successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            success([VisitRecordModel mj_objectArrayWithKeyValuesArray:[[returnValue objectForKey:@"Data"]objectForKey:@"PageData"]]);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (void)getCardWithType:(NSInteger)type andPage:(NSInteger)pageIndex andSuccess:(SuccessBlock)success andFail:(FailBlock)fail{
    [self GET_Field_Url:@"api/Personal/UserCouponList" Params:@{@"type":@(type),@"pageIndex":@(pageIndex),@"pageSize":defaultPageSize} successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            success([MyCardModel mj_objectArrayWithKeyValuesArray:[[returnValue objectForKey:@"Data"]objectForKey:@"PageData"]]);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (void)getHasFollowWithId:(NSString *)userId andSuccess:(SuccessBlock)success andFail:(FailBlock)fail{
    [self GET_Field_Url:@"api/Personal/GetHasFollow" Params:@{@"id":userId} successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            success([returnValue objectForKey:@"Data"]);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (void)getZfbInfoWithMoney:(float)money andSuccess:(SuccessBlock)success andFail:(FailBlock)fail{
    [self GET_Field_Url:@"api/Recharge/GetZfbInfo" Params:@{@"money":@(money)} successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            success([returnValue objectForKey:@"Data"]);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (void)getWechatInfoWithMoney:(float)money andSuccess:(SuccessBlock)success andFail:(FailBlock)fail{
    [self GET_Field_Url:@"api/Recharge/GetWxInfo" Params:@{@"money":@(money)} successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            success([returnValue objectForKey:@"Data"]);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (void)getCommentNoticeWithPage:(NSInteger)page andSuccess:(SuccessBlock)success andFail:(FailBlock)fail{
    [self GET_Field_Url:@"api/Personal/GetCommentNotice" Params:@{@"page":@(page),@"uid":[UserModel userModel].UserId,@"pageSize":defaultPageSize} successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            success([CommentModel mj_objectArrayWithKeyValuesArray:[[returnValue objectForKey:@"Data"]objectForKey:@"PageData"]]);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (void)getSystemNoticeWithPage:(NSInteger)page andSuccess:(SuccessBlock)success andFail:(FailBlock)fail{
    [self GET_Field_Url:@"api/Personal/GetSysMessage" Params:@{@"page":@(page),@"uid":[UserModel userModel].UserId,@"pageSize":defaultPageSize} successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            success([CommentModel mj_objectArrayWithKeyValuesArray:[[returnValue objectForKey:@"Data"]objectForKey:@"PageData"]]);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (void)getNoticeNoReadWithSuccess:(SuccessBlock)success andFail:(FailBlock)fail{
    [self GET_Field_Url:@"api/Personal/GetNoticeNoRead" Params:nil successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            success([returnValue objectForKey:@"Data"]);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (void)getInvitationRegWithSuccess:(SuccessBlock)success andFail:(FailBlock)fail{
    [self GET_Field_Url:@"api/Personal/InvitationReg" Params:nil successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            success([returnValue objectForKey:@"Data"]);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (void)getInvitationInfoWithSuccess:(SuccessBlock)success andFail:(FailBlock)fail{
    [self GET_Field_Url:@"api/Personal/GetInvitationReg" Params:nil successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            success([returnValue objectForKey:@"Data"]);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (void)getStatisticsAndListWithUid:(NSString *)uId andLType:(NSInteger)lType andPlayName:(NSString *)playName andPageSize:(NSInteger)pageSize andSuccess:(SuccessBlock)success andFail:(FailBlock)fail{
    [self GET_Field_Url:@"api/Plan/GetStatisticsAndList" Params:@{@"uId":uId,@"lType":@(lType),@"playName":playName,@"issueNum":@(pageSize)} successBlock:^(id returnValue) {
        if ([[returnValue objectForKey:@"Code"] intValue]==APIResponseStutusSuccess) {
            success([returnValue objectForKey:@"Data"]);
        }else{
            [SVProgressHUD showErrorWithStatus:[returnValue objectForKey:@"Desc"]];
            fail(nil,nil);
        }
    } failBlock:^(NSString *errorMessage, NSError *error) {
        [SVProgressHUD showErrorWithStatus:errorMessage];
        fail(nil,nil);
    }];
}

- (NSMutableArray *)bankArr{
    if (!_bankArr) {
        _bankArr=[[NSMutableArray alloc]initWithObjects:
                  @{@"img":[UIImage imageNamed:@"ICBC"],@"name":@"中国工商银行",@"alias":@"ICBC"},
                  @{@"img":[UIImage imageNamed:@"BOC"],@"name":@"中国银行",@"alias":@"BOC"},
                  @{@"img":[UIImage imageNamed:@"CCB"],@"name":@"中国建设银行",@"alias":@"CCB"},
                  @{@"img":[UIImage imageNamed:@"ABC"],@"name":@"中国农业银行",@"alias":@"ABC"},
                  @{@"img":[UIImage imageNamed:@"PSBC"],@"name":@"中国邮政储蓄银行",@"alias":@"PSBC"},
                  @{@"img":[UIImage imageNamed:@"CEB"],@"name":@"中国光大银行",@"alias":@"CEB"},
                  @{@"img":[UIImage imageNamed:@"COMM"],@"name":@"交通银行",@"alias":@"COMM"},
                  @{@"img":[UIImage imageNamed:@"CMB"],@"name":@"招商银行",@"alias":@"CMB"},
                  @{@"img":[UIImage imageNamed:@"CMBC"],@"name":@"中国民生银行",@"alias":@"CMBC"},
                  @{@"img":[UIImage imageNamed:@"CIB"],@"name":@"兴业银行",@"alias":@"CIB"},
                  @{@"img":[UIImage imageNamed:@"CITIC"],@"name":@"中信银行",@"alias":@"CITIC"},
                  @{@"img":[UIImage imageNamed:@"GDB"],@"name":@"广发银行",@"alias":@"GDB"},
                  @{@"img":[UIImage imageNamed:@"HXBANK"],@"name":@"华夏银行",@"alias":@"HXBANK"},
                  @{@"img":[UIImage imageNamed:@"SPDB"],@"name":@"浦发银行",@"alias":@"SPDB"},
                  @{@"img":[UIImage imageNamed:@"SPABANK"],@"name":@"平安银行",@"alias":@"SPABANK"},
                  nil];
    }
    return _bankArr;
}

static MyVM *n_manager=nil;
+ (MyVM *)manage{
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        n_manager=[[MyVM alloc]init];
    });
    return n_manager;
}
@end
